package com.example.model.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 
 * @TableName transfer_record
 */
@TableName(value ="transfer_record")
@Data
public class TransferRecord implements Serializable {
    /**
     * 转移ID
     */
    @TableId
    private Long transferId;

    /**
     * 参保人地址
     */
    private String employeeAddress;

    /**
     * 转出社保局地址
     */
    private String fromBureauAddress;

    /**
     * 转入社保局地址
     */
    private String toBureauAddress;

    /**
     * 转移类型 0-城镇职工养老保险 1-城乡居民养老保险 2-医疗保险
     */
    private Integer transferType;

    /**
     * 转移日期
     */
    private Date transferDate;

    /**
     * 转移金额
     */
    private BigDecimal transferAmount;

    /**
     * 累计缴费月数
     */
    private Integer accumulatedMonths;

    /**
     * 申请日期
     */
    private Date applicationDate;

    /**
     * 审批日期
     */
    private Date approvalDate;

    /**
     * 审批状态 0-待审核 1-已审核 2-已转出 3-已转入 4-拒绝
     */
    private Integer approvalStatus;

    /**
     * 转出社保号
     */
    private String fromInsuranceNumber;

    /**
     * 转入社保号
     */
    private String toInsuranceNumber;

    /**
     * 转移原因
     */
    private String transferReason;

    /**
     * 转移凭证编号
     */
    private String transferCertificateNo;

    /**
     * 备注
     */
    private String remark;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TransferRecord other = (TransferRecord) that;
        return (this.getTransferId() == null ? other.getTransferId() == null : this.getTransferId().equals(other.getTransferId()))
            && (this.getEmployeeAddress() == null ? other.getEmployeeAddress() == null : this.getEmployeeAddress().equals(other.getEmployeeAddress()))
            && (this.getFromBureauAddress() == null ? other.getFromBureauAddress() == null : this.getFromBureauAddress().equals(other.getFromBureauAddress()))
            && (this.getToBureauAddress() == null ? other.getToBureauAddress() == null : this.getToBureauAddress().equals(other.getToBureauAddress()))
            && (this.getTransferType() == null ? other.getTransferType() == null : this.getTransferType().equals(other.getTransferType()))
            && (this.getTransferDate() == null ? other.getTransferDate() == null : this.getTransferDate().equals(other.getTransferDate()))
            && (this.getTransferAmount() == null ? other.getTransferAmount() == null : this.getTransferAmount().equals(other.getTransferAmount()))
            && (this.getAccumulatedMonths() == null ? other.getAccumulatedMonths() == null : this.getAccumulatedMonths().equals(other.getAccumulatedMonths()))
            && (this.getApplicationDate() == null ? other.getApplicationDate() == null : this.getApplicationDate().equals(other.getApplicationDate()))
            && (this.getApprovalDate() == null ? other.getApprovalDate() == null : this.getApprovalDate().equals(other.getApprovalDate()))
            && (this.getApprovalStatus() == null ? other.getApprovalStatus() == null : this.getApprovalStatus().equals(other.getApprovalStatus()))
            && (this.getFromInsuranceNumber() == null ? other.getFromInsuranceNumber() == null : this.getFromInsuranceNumber().equals(other.getFromInsuranceNumber()))
            && (this.getToInsuranceNumber() == null ? other.getToInsuranceNumber() == null : this.getToInsuranceNumber().equals(other.getToInsuranceNumber()))
            && (this.getTransferReason() == null ? other.getTransferReason() == null : this.getTransferReason().equals(other.getTransferReason()))
            && (this.getTransferCertificateNo() == null ? other.getTransferCertificateNo() == null : this.getTransferCertificateNo().equals(other.getTransferCertificateNo()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getTransferId() == null) ? 0 : getTransferId().hashCode());
        result = prime * result + ((getEmployeeAddress() == null) ? 0 : getEmployeeAddress().hashCode());
        result = prime * result + ((getFromBureauAddress() == null) ? 0 : getFromBureauAddress().hashCode());
        result = prime * result + ((getToBureauAddress() == null) ? 0 : getToBureauAddress().hashCode());
        result = prime * result + ((getTransferType() == null) ? 0 : getTransferType().hashCode());
        result = prime * result + ((getTransferDate() == null) ? 0 : getTransferDate().hashCode());
        result = prime * result + ((getTransferAmount() == null) ? 0 : getTransferAmount().hashCode());
        result = prime * result + ((getAccumulatedMonths() == null) ? 0 : getAccumulatedMonths().hashCode());
        result = prime * result + ((getApplicationDate() == null) ? 0 : getApplicationDate().hashCode());
        result = prime * result + ((getApprovalDate() == null) ? 0 : getApprovalDate().hashCode());
        result = prime * result + ((getApprovalStatus() == null) ? 0 : getApprovalStatus().hashCode());
        result = prime * result + ((getFromInsuranceNumber() == null) ? 0 : getFromInsuranceNumber().hashCode());
        result = prime * result + ((getToInsuranceNumber() == null) ? 0 : getToInsuranceNumber().hashCode());
        result = prime * result + ((getTransferReason() == null) ? 0 : getTransferReason().hashCode());
        result = prime * result + ((getTransferCertificateNo() == null) ? 0 : getTransferCertificateNo().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", transferId=").append(transferId);
        sb.append(", employeeAddress=").append(employeeAddress);
        sb.append(", fromBureauAddress=").append(fromBureauAddress);
        sb.append(", toBureauAddress=").append(toBureauAddress);
        sb.append(", transferType=").append(transferType);
        sb.append(", transferDate=").append(transferDate);
        sb.append(", transferAmount=").append(transferAmount);
        sb.append(", accumulatedMonths=").append(accumulatedMonths);
        sb.append(", applicationDate=").append(applicationDate);
        sb.append(", approvalDate=").append(approvalDate);
        sb.append(", approvalStatus=").append(approvalStatus);
        sb.append(", fromInsuranceNumber=").append(fromInsuranceNumber);
        sb.append(", toInsuranceNumber=").append(toInsuranceNumber);
        sb.append(", transferReason=").append(transferReason);
        sb.append(", transferCertificateNo=").append(transferCertificateNo);
        sb.append(", remark=").append(remark);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}